package com.examfrowuwei.service.impl;

import com.examfrowuwei.common.Result;
import com.examfrowuwei.common.Results;
import com.examfrowuwei.controller.User;
import com.examfrowuwei.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Override
    public Result login(User user) {
        if("test".equals(user.getName()) && "123456".equals(user.getPassword())) {
            return Results.success("token","登录成功");
        }else {
            return Results.failure("登录失败");
        }
    }
}
